/**
 * <copyright>
 * </copyright>
 *

 */
package hu.bme.mit.androtext.androapp.androAppDsl.impl;

import hu.bme.mit.androtext.androapp.androAppDsl.*;

import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EPackage;

import org.eclipse.emf.ecore.impl.EFactoryImpl;

import org.eclipse.emf.ecore.plugin.EcorePlugin;

/**
 * <!-- begin-user-doc -->
 * An implementation of the model <b>Factory</b>.
 * <!-- end-user-doc -->
 * @generated
 */
public class AndroAppDslFactoryImpl extends EFactoryImpl implements AndroAppDslFactory
{
  /**
   * Creates the default factory implementation.
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public static AndroAppDslFactory init()
  {
    try
    {
      AndroAppDslFactory theAndroAppDslFactory = (AndroAppDslFactory)EPackage.Registry.INSTANCE.getEFactory("http://www.bme.hu/mit/androtext/androapp/AndroAppDsl"); 
      if (theAndroAppDslFactory != null)
      {
        return theAndroAppDslFactory;
      }
    }
    catch (Exception exception)
    {
      EcorePlugin.INSTANCE.log(exception);
    }
    return new AndroAppDslFactoryImpl();
  }

  /**
   * Creates an instance of the factory.
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public AndroAppDslFactoryImpl()
  {
    super();
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  @Override
  public EObject create(EClass eClass)
  {
    switch (eClass.getClassifierID())
    {
      case AndroAppDslPackage.ANDROID_APPLICATION: return createAndroidApplication();
      case AndroAppDslPackage.MODEL_ELEMENT: return createModelElement();
      case AndroAppDslPackage.ACTIVITY: return createActivity();
      default:
        throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier");
    }
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public AndroidApplication createAndroidApplication()
  {
    AndroidApplicationImpl androidApplication = new AndroidApplicationImpl();
    return androidApplication;
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public ModelElement createModelElement()
  {
    ModelElementImpl modelElement = new ModelElementImpl();
    return modelElement;
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public Activity createActivity()
  {
    ActivityImpl activity = new ActivityImpl();
    return activity;
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public AndroAppDslPackage getAndroAppDslPackage()
  {
    return (AndroAppDslPackage)getEPackage();
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @deprecated
   * @generated
   */
  @Deprecated
  public static AndroAppDslPackage getPackage()
  {
    return AndroAppDslPackage.eINSTANCE;
  }

} //AndroAppDslFactoryImpl
